package com.bojiu.lawsearch.lawsearch.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * @author: afdiao
 * @Date：2020/3/2 21:35
 * @Description:
 */
@ApiModel(value = "工程师明细",description = "工程师明细")
@Table(name = "mst_engineer")
@Data
public class Engineer {

    @Column(name = "id")
    private Integer id;

    @ApiModelProperty(value = "工程师的真实姓名",required = true)
    @NotNull(message = "工程师名字不能为空")
    @Column(name = "name")
    private String name;


    @Column(name = "user_id")
    private Integer user_id;

    /**
     * 技能 标签id  逗号分隔
     */
    @ApiModelProperty(value = "工程师选择的标签id，多个标签id用逗号分隔",required = true)
    @NotNull(message = "标签不能为空")
    @Column(name = "label_id")
    private String label_id;

    /**
     * 标签的中文名
     */
    @ApiModelProperty(value = "工程师标签的中文名")
    @Transient
    private List<String> labelNames;

    @ApiModelProperty(value = "工程师的年限",required = true)
    @NotNull(message = "工作年份不能为空")
    @Column(name = "year")
    private String year;

    /**
     * 是否认证
     * 0 未处理
     * 1 认证
     * 2 未通过
     */
    @ApiModelProperty(value = "审核状态，0未处理  1 已认证   2 审核未通过（未通过时要展示未通过的理由）")
    @Column(name = "is_authentication")
    private Integer is_authentication;

    /**
     * 未通过的理由
     */
    @ApiModelProperty(value = "审核未通过的理由")
    @Column(name = "reason")
    private String reason;

    @ApiModelProperty(value = "证书编号",required = true)
    @NotNull(message = "证书号不能为空")
    @Column(name = "certificate_no")
    private String certificate_no;

    @ApiModelProperty(value = "工程师邮箱",required = true)
    @NotNull(message = "邮箱不能为空")
    @Column(name = "mail")
    private String mail;

    /**
     * 创建日期
     */
    @ApiModelProperty("创建日期")
    @Column(name = "addTime")
    private Date addTime;

    /**
     * 修改日期
     */
    @ApiModelProperty("修改日期")
    @Column(name = "updateTime")
    private Date updateTime;
}
